<cfcomponent displayname="" hint="" output="false">
    <!--- application variables --->
    <cfset this.applicationTimeout = createTimeSpan(0,1,17,0)>
    <cfset this.clientmanagement = true>
<!---  --->
    <cfset this.clientStorage = "clientVars">
<!---  --->
	<cfset this.customTagPaths = "C:\ColdFusion9\wwwroot\cfarchitect\customtags\">
    <cfset this.loginStorage = "session">
    <cfset this.name = "Blazon">
    <cfset this.sessionManagement = true>
    <cfset this.sessionTimeout = createTimeSpan(0,0,37,0)>
    <cfset this.setClientCookies = true>
    <cfset this.setDomainCookies = false>
    <cfset this.scriptProtect = true>
    <cfset this.smtpserver = "mail.google.com">

<!---  --->
<!---  --->
<!--- onApplicationStart --->
    <cffunction name="onApplicationStart" access="public" returntype="boolean" output="false">
	    <cfset application.debugIPaddresses = "127.0.0.1,0:0:0:0:0:0:0:1">
		<cfset application.debugLog = arrayNew(1)>
	    <cfset application.errorLog = arrayNew(1)>
	    <cfset application.path = "C:/ColdFusion9/wwwroot/cfarchitect/">
	    <cfset application.URL = "http://localhost:8500/cfarchitect/">

        <cfreturn true>
    </cffunction>
<!--- onApplicationStart --->
<!---  --->
<!---  --->
<!--- onApplicationEnd --->
    <cffunction name="onApplicationEnd" access="public" returntype="void" output="false">
        <cfargument name="applicationScope" type="struct" required="false" default="#structNew()#">

        <cfreturn true>
    </cffunction>
<!--- onApplicationEnd --->
<!---  --->
<!---  --->
<!--- onSessionStart --->
    <cffunction name="onSessionStart" access="public" returntype="void" output="false">
    </cffunction>
<!--- onSessionStart --->
<!---  --->
<!---  --->
<!--- onSessionEnd --->
    <cffunction name="onSessionEnd" access="public" returntype="void" output="false">
        <cfargument name="sessionScope" type="struct" required="true">
        <cfargument name="applicationScope" type="struct" required="false" default="#StructNew()#"/>

    </cffunction>
<!--- onSessionEnd --->
<!---  --->
<!---  --->
<!--- onRequestStart --->
	<cffunction name="onRequestStart" access="public" returnType="boolean" output="true">
		<cfargument type="String" name="targetPage" required="true">

		<!--- event handling --->
		<cfif structCount(URL)>
			<cfif isDefined("URL.restart")>
				<cfset onApplicationStart()>
				<cflocation addtoken="false" url="#arguments.targetPage#">
			</cfif>
		</cfif>

		<cfreturn true>
	</cffunction>
<!--- onRequestStart --->
<!---  --->
<!--- onRequestEnd --->
    <cffunction name="onRequestEnd" access="public" returntype="void" output="false">
    </cffunction>
<!--- onRequestEnd --->
<!---  --->
<!--- onError --->
    <cffunction name="onError" access="public" returntype="void" output="true">
		<cfargument name="Exception" required=true>
		<cfargument name="EventName" type="String" required=true>

		<cfif NOT (isDefined("application.errorLog") AND isArray(application.errorLog))>
			<cfset application.errorLog = arrayNew(1)>
		</cfif>

		<cfif isDefined("Arguments.Exception.RootCause") AND (Arguments.Exception.RootCause EQ "coldfusion.runtime.AbortException")>
			<cfreturn>
		</cfif>

		<cfset thisError.errorDateTime = dateFormat(now(), "full")>
		<cfset thisError.eventName = arguments.eventName>
		<cfset thisError.exception = arguments.exception>
		<cfset thisError.session = structCopy(session)>
		<cfset thisError.CGI = structCopy(CGI)>
		<cfset thisError.form = structCopy(form)>
		<cfset thisError.URL = structCopy(URL)>

		<!--- save a temporary copy of this error --->
		<cfset arrayAppend(application.errorLog, thisError)>

		<cfif isDefined("application.debugIPaddresses")>
			<cfif listContains(application.debugIPaddresses, "#remote_addr#")>
				<div align="center" style="border: thin solid red;">
					ERROR<br><br>
					<!---<cfdump var="#exception#">--->
					<cftry>
						<cfdump var="#structFind(exception, "Message")#"><br>

						<cfcatch></cfcatch>
					</cftry>

					<cftry>
						<cfdump var="#structFind(exception, "Detail")#"><br>

						<cfcatch></cfcatch>
					</cftry>

					<cftry>
						<cfdump var="#structFind(exception, "TagContext")#"><br>

						<cfcatch></cfcatch>
					</cftry>

					<cftry>
						<cfdump var="#structFind(exception, "SQL")#"><br>

						<cfcatch></cfcatch>
					</cftry>
				</div>
			<cfelse>
				An error has occurred.<br><br>
				The developers have been notified of this error and will remedy it.<br><br>
				<cfmail to="fingerskier@gmail.com" from="blazon@#CGI.HTTP_HOST#" subject="Blazon Error!" type="HTML">
					<cfdump var="#thisError#" label="Error Info">
				</cfmail>
			</cfif>
		</cfif>

		<cfreturn>
    </cffunction>
<!--- onError --->
<!---  --->
<!--- onMissingTemplate --->
    <cffunction name="onMissingTemplate" access="public" returnType="boolean" output="false">
        <cfargument type="string" name="targetPage" required=true/>

        <cfreturn true/>
    </cffunction>
</cfcomponent>